#include "vos_print.h"
#include "vos_config.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
VOS_VOID vos_print_info(const char *module, const char *fmt, ...)
{
#if (VOS_PRINT_LEVEL <= VOS_PRINT_LEVEL_INFO)
    va_list args;
    fprintf(stderr, "[%s] Info: ", module);
    va_start(args, fmt);
    vfprintf(stderr, fmt, args);
    va_end(args);
    fprintf(stderr, "\n");
#endif
}

VOS_VOID vos_print_warn(const char *module, const char *fmt, ...)
{
#if (VOS_PRINT_LEVEL <= VOS_PRINT_LEVEL_WARN)
    va_list args;
    fprintf(stderr, "[%s] Warn: ", module);
    va_start(args, fmt);
    vfprintf(stderr, fmt, args);
    va_end(args);
    fprintf(stderr, "\n");
#endif
}

VOS_VOID vos_print_error(const char *module, const char *fmt, ...)
{
#if (VOS_PRINT_LEVEL <= VOS_PRINT_LEVEL_ERR)
    va_list args;
    fprintf(stderr, "[%s] Error: ", module);
    va_start(args, fmt);
    vfprintf(stderr, fmt, args);
    va_end(args);
    fprintf(stderr, "\n");
#endif
}
